package entity;

import java.time.LocalDate;

/**
 * @author zk
 * @Description: 测试实体类
 * @date 2019-10-10 9:23
 */
public class User {
    private Integer id;
    private String name;
    private Sex sex;
    private Integer age;
    private Double salary;
    private LocalDate birthday;

    public User() {
    }

    public User(Integer id, String name, Sex sex, Integer age, Double salary) {
        this.id = id;
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.salary = salary;
    }

    public User(Integer id, String name, Sex sex, Integer age, Double salary, LocalDate birthday) {
        this.id = id;
        this.name = name;
        this.sex = sex;
        this.age = age;
        this.salary = salary;
        this.birthday = birthday;
    }

    public Integer getId() {
        return id;
    }

    public User setId(Integer id) {
        this.id = id;
        return this;
    }

    public String getName() {
        return name;
    }

    public User setName(String name) {
        this.name = name;
        return this;
    }

    public Sex getSex() {
        return sex;
    }

    public User setSex(Sex sex) {
        this.sex = sex;
        return this;
    }

    public Integer getAge() {
        return age;
    }

    public User setAge(Integer age) {
        this.age = age;
        return this;
    }

    public Double getSalary() {
        return salary;
    }

    public User setSalary(Double salary) {
        this.salary = salary;
        return this;
    }

    public LocalDate getBirthday() {
        return birthday;
    }

    public User setBirthday(LocalDate birthday) {
        this.birthday = birthday;
        return this;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", sex=" + sex +
                ", age=" + age +
                ", salary=" + salary +
                ", birthday=" + birthday +
                '}';
    }

    public enum Sex {
        MALE,FEMALE;
    }
}
